home *** CD-ROM | disk | FTP | other *** search
Text File | 2001-04-17 | 59.1 KB | 1,387 lines |
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- NNNNAAAAMMMMEEEE
- VkDialogManager - An abstract manager class that caches and supports
- Motif dialogs
-
- IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
- VkComponent : VkCallbackObject
-
- HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
- #include <Vk/VkDialogManager.h>
-
- PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
- DDDDeeeessssttttrrrruuuuccccttttoooorrrr
- virtual void ~VkDialogManager(void);
-
-
- SSSSeeeettttttttiiiinnnngggg LLLLaaaabbbbeeeellllssss aaaannnndddd TTTTiiiittttlllleeeessss
- void setTitle(const char* nextTitle);
- void setButtonLabels(const char* okLabel,
- const char* cancelLabel,
- const char* applyLable);
-
-
- UUUUnnnnppppoooossssttttiiiinnnngggg DDDDiiiiaaaallllooooggggssss
- void unpost(void);
- void unpost(Widget dialogWidget);
- void unpostAll(void);
-
-
- CCCChhhhaaaannnnggggiiiinnnngggg DDDDiiiiaaaalllloooogggg bbbbeeeehhhhaaaavvvviiiioooorrrr
- void centerOnScreen(Boolean center);
- void enableCancelButton (Boolean b);
-
-
- AAAAcccccccceeeessssssss ffffuuuunnnnccccttttiiiioooonnnnssss
- Widget lastPosted(void);
-
-
- AAAAcccccccceeeessssssss ffffuuuunnnnccccttttiiiioooonnnnssss ---- VVVViiiieeeewwwwKKKKiiiitttt 2222....1111 oooonnnnllllyyyy
- VkScreen getScreen();
-
-
- PPPPoooossssttttiiiinnnngggg NNNNoooonnnn----MMMMooooddddaaaallll DDDDiiiiaaaallllooooggggssss
- virtual Widget post (
- const char *message = NULL,
- XtCallbackProc okCB = NULL,
- XtCallbackProc cancelCB = NULL,
- XtCallbackProc applyCB = NULL,
- XtPointer clientData = NULL,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL,
- Widget widgetParent = NULL);
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- Widget post ( const char *msg,
- VkSimpleWindow *parent)
-
- Widget post ( const char *msg,
- const char *helpString,
- VkSimpleWindow *parent)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- const char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtCallbackProc applyCB,
- XtPointer clientData,
- VkSimpleWindow *parent)
-
- Widget post ( const char *msg,
- Widget parent)
-
- Widget post ( const char *msg,
- const char *helpString,
- Widget parent)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- Widget parent)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- XtPointer clientData,
- const char *helpString,
- Widget parent)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- Widget parent)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- char *helpString,
- Widget parent)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtCallbackProc applyCB,
- XtPointer clientData,
- Widget parent)
-
-
- PPPPoooossssttttiiiinnnngggg MMMMooooddddaaaallll DDDDiiiiaaaallllooooggggssss
- virtual Widget postModal (
- const char *message = NULL,
- XtCallbackProc okCB = NULL,
- XtCallbackProc cancelCB = NULL,
- XtCallbackProc applyCB = NULL,
- XtPointer clientData = NULL,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL,
- Widget widgetParent = NULL);
-
-
- Widget postModal ( const char *msg,
- VkSimpleWindow *parent)
-
- Widget postModal ( const char *msg,
- const char *helpString,
- VkSimpleWindow *parent)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- const char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtCallbackProc applyCB,
- XtPointer clientData,
- VkSimpleWindow *parent)
-
- Widget postModal ( const char *msg,
- Widget parent)
-
- Widget postModal ( const char *msg,
- const char *helpString,
- Widget parent)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- Widget parent)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- const char *helpString,
- Widget parent)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- Widget parent)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- char *helpString,
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- Widget parent)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtCallbackProc applyCB,
- XtPointer clientData,
- Widget parent)
-
-
- PPPPoooossssttttiiiinnnngggg BBBBlllloooocccckkkkiiiinnnngggg DDDDiiiiaaaallllooooggggssss
- virtual Widget postBlocked (
- const char *message = NULL,
- XtCallbackProc okCB = NULL,
- XtCallbackProc cancelCB = NULL,
- XtCallbackProc applyCB = NULL,
- XtPointer clientData = NULL,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL,
- Widget widgetParent = NULL);
-
-
- Widget postBlocked ( const char *msg,
- VkSimpleWindow *parent)
-
- Widget postBlocked ( const char *msg,
- const char *helpString,
- VkSimpleWindow *parent)
-
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- const char *helpString,
- VkSimpleWindow *parent = NULL)
-
-
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- char *helpString,
- VkSimpleWindow *parent = NULL)
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtCallbackProc applyCB,
- XtPointer clientData,
- VkSimpleWindow *parent)
-
-
- SSSSiiiimmmmpppplllliiiiffffiiiieeeedddd BBBBlllloooocccckkkkiiiinnnngggg DDDDiiiiaaaallllooooggggssss
- virtual VkDialogReason postAndWait (
- const char *message = NULL,
- Boolean ok = TRUE,
- Boolean cancel = TRUE,
- Boolean apply = FALSE,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL);
-
- VkDialogReason postAndWait (
- const char *message,
- const char *helpString,
- VkSimpleWindow *parent = NULL);
-
- VkDialogReason postAndWait ( const char *message,
- VkSimpleWindow *parent)
-
-
-
- VVVViiiissssuuuuaaaallll CCCCoooonnnnttttrrrroooollll
- static void useOverlayDialogs(const Boolean flag)
- void setArgs (ArgList list, Cardinal argCnt)
- void setVisual (VkVisual *v)
-
-
-
- PPPPRRRROOOOTTTTEEEECCCCTTTTEEEEDDDD PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
- MMMMaaaannnniiiippppuuuullllaaaattttiiiinnnngggg ddddiiiiaaaallllooooggggssss pppprrrriiiioooorrrr ttttoooo ppppoooossssttttiiiinnnngggg
- virtual Widget prepost (
- const char *message,
- XtCallbackProc okCB = NULL,
- XtCallbackProc cancelCB = NULL,
- XtCallbackProc applyCB = NULL,
- XtPointer clientData = NULL,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL);
-
- Widget prepost ( const char *message,
- const char *helpString,
- VkSimpleWindow *parent);
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 6666
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- RRRReeeessssppppoooonnnnddddiiiinnnngggg ttttoooo UUUUsssseeeerrrr AAAAccccttttiiiioooonnnnssss
- virtual void ok(Widget widget, XtPointer callData);
- virtual void cancel(Widget widget, XtPointer callData);
- virtual void apply(Widget widget, XtPointer callData);
-
-
- CCCCrrrreeeeaaaattttiiiinnnngggg NNNNeeeewwww DDDDiiiiaaaallllooooggggssss
- virtual Widget createDialog(Widget parent);
-
-
- CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
- VkDialogManager(const char *name);
-
-
- PPPPrrrrooootttteeeecccctttteeeedddd DDDDaaaattttaaaa MMMMeeeemmmmbbbbeeeerrrrssss
- int _action;
-
-
- Boolean _showOK;
-
-
- Boolean _showCancel;
-
-
- Boolean _showApply;
-
-
- Boolean _allowMultipleDialogs;
-
-
- Boolean _minimizeMultipleDialogs;
-
-
-
-
- CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The VkDialogManager class is an abstract class that supports
- cacheable, easy-to-use Motif dialogs for ViewKit applications. The
- VkDialogManager class provides the public protocol though which all
- derived classes are manipulated. This protocol is intended to
- simplify the procedure of posting a dialog, and make it possible to
- post dialogs without interacting directly with widgets. This is
- useful because the need to report errors often occurs outside the UI
- layers of an application. The VkDialogManager class uses caching to
- achieve an optimal balance between the time required to create a
- dialog dynamically and the time and memory needed to pre-create
- dialogs.
-
- Dialogs may be posted using a variation of four basic member
- functions: _p_o_s_t(), _p_o_s_t_M_o_d_a_l(), _p_o_s_t_B_l_o_c_k_e_d() and _p_o_s_t_A_n_d_W_a_i_t().
- These member functions allow the calling application to easily
- control the style of the dialog. The VkDialogManager attempts to
-
-
-
- PPPPaaaaggggeeee 7777
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- cache and reuse existing dialog widgets wherever possible, and also
- allows the calling application to determine which buttons and labels
- appear on any dialog, as well as to specify functions to be called
- when various dialog buttons are selected.
-
- All classes derived from VkDialogManager catch the window manager
- close function and redirect it to the "cancel" action normally
- associated with the dialog.
-
-
-
- SSSSEEEETTTTTTTTIIIINNNNGGGG CCCCRRRREEEEAAAATTTTIIIIOOOONNNN----TTTTIIIIMMMMEEEE RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS FFFFOOOORRRR DDDDIIIIAAAALLLLOOOOGGGGSSSS
- There is no way in the ViewKit dialogs' API, theXyzDialog->post(), for an
- application to specify an arglist. There are ways around this:
-
- +o Setting dialogs in the deepest available overlay can most easily be
- done by using _u_s_e_O_v_e_r_l_a_y_D_i_a_l_o_g_s.
-
- +o Setting dialogs to a specific visual is most easily done by using
- _s_e_t_V_i_s_u_a_l(). This _V_k_V_i_s_u_a_l will be used for any subsequent dialog
- creation.
-
- +o _s_e_t_A_r_g_s() allows passing an arbitrary _a_r_g_L_i_s_t. This list will be
- used for any subsequent dialog creation.
-
- Dialog arguments should be set once, before any dialog is created.
- Resetting the dialog creation arguments after the first dialog is created
- results in an undefined action. The reason is that, due to ViewKit's
- dialog caching, later setting of creation arguments is not always
- predictable.
-
-
- DDDDIIIIAAAALLLLOOOOGGGGSSSS IIIINNNN TTTTHHHHEEEE OOOOVVVVEEEERRRRLLLLAAAAYYYY PPPPLLLLAAAANNNNEEEESSSS
- By default, dialogs appear in the normal planes. A ViewKit application's
- dialogs may be explicitly placed in the deepest available overlay planes.
- Doing so prevents dialogs from causing expose events and disturbing such
- things as complex GL rendering. Whether or not the dialogs look as nice
- as they do in the normal planes depends on how deep the deepest available
- overlay visual is. The current implementation is global. For a single
- application, either all dialogs go in the overlay planes or none of them
- do. That may be relaxed in a future release.
-
- There are three ways to enable dialogs in the overlay planes:
-
- +o Call VkDialogManager::useOverlayDialogs(TRUE) in your application.
- This will force all dialogs to be in the overlay planes, with no way
- to put them back in the normal planes without recompiling.
-
- +o Put the resource string "*useOverlayDialogs: True" in your
- application's app-defaults file. This will put dialogs in the
- overlay planes by default, but allow users to use the normal planes
- by changing their .Xdefaults file.
-
-
-
- PPPPaaaaggggeeee 8888
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- +o Ask the user to add the "-useOverlayDialogs" command line switch
- when they run your application. This will put dialogs in the normal
- planes by default, but allow the user to explicitly ask that the
- overlay planes be used.
-
- There are several disadvantages to using the overlay planes, so dialogs
- should be put there only when the advantages outweigh the disadvantages:
-
- +o The colormap in the overlay planes may have fewer pixels. On some
- hardware, the deepest overlay only has three color entries. (The
- fourth entry is a transparent pixel.) When there are fewer colors
- available, dialogs in the overlay planes have a different appearance
- - especially with some of the less-common color schemes.
-
- +o Other applications that are using the overlay planes at the same
- time will display in the wrong colors when an overlay dialog appears
- (i.e. colors will flash). This happens because the dialog's
- colormap will get installed and replace any previous overlay
- colormap.
-
- +o When a dialog is in the overlay planes, 4Dwm puts the window manager
- border in the popup visual. The title bar of the window appears
- with the wrong colors and, as with (2), the window appears with the
- wrong colors when another application uses the overlay planes (e.g.
- 4Dwm's root-window popup dialog).
-
- For more information see /_u_s_r/_s_h_a_r_e/_s_r_c/_V_i_e_w_K_i_t/_B_a_s_i_c/_V_i_s_u_a_l/*.
-
-
-
- PPPPOOOOSSSSTTTTIIIINNNNGGGG DDDDIIIIAAAALLLLOOOOGGGGSSSS
-
-
- DDDDEEEERRRRIIIIVVVVIIIINNNNGGGG SSSSUUUUBBBBCCCCLLLLAAAASSSSSSSSEEEESSSS
- Derived classes generally only need to override the function
- _c_r_e_a_t_e_D_i_a_l_o_g() to return a dialog widget of the desired type. The
- dialog widget returned by this function must be a subclass of
- XmMessageBox or XmSelectionBox. Classes corresponding to the
- standard Motif dialog widgets have already been defined. Custom
- dialog classes should normally be derived from VkGenericDialog.
-
-
-
- FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
- ggggeeeettttSSSSccccrrrreeeeeeeennnn(((()))) ---- VVVViiiieeeewwwwKKKKiiiitttt 2222....1111 oooonnnnllllyyyy
- VkScreen *getScreen();
-
-
- Return the VkScreen object associated with this dialogManager.
-
-
-
-
-
-
- PPPPaaaaggggeeee 9999
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- pppprrrreeeeppppoooosssstttt(((())))
- Widget prepost(const char *message,
- const char *helpString,
- VkSimpleWindow* parent);
-
- virtual Widget prepost(
- const char *message,
- XtCallbackProc okCB = NULL,
- XtCallbackProc cancelCB = NULL,
- XtCallbackProc applyCB = NULL,
- XtPointer clientData = NULL,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL);
-
-
- This protected function is called from the VkDialogManager _p_o_s_t()
- function. The _p_r_e_p_o_s_t() function is responsible for finding or
- creating a dialog to be displayed by one of the _p_o_s_t() functions.
- Derived classes that wish to perform some operations on a dialog
- widget before displaying it on the screen should override this
- function, call the VkDialogManager function directly to obtain a
- widget, do whatever additional operations are desired and then
- return the Widget returned by _V_k_D_i_a_l_o_g_M_a_n_a_g_e_r::_p_r_e_p_o_s_t().
-
- ooookkkk(((())))
- virtual void ok(Widget w, XtPointer clientData);
-
-
- This function provides a hook for derived classes that need to know
- when the user has selected the OK button. Applications that use
- dialogs should register Xt callbacks with the _p_o_s_t() method to be
- notified.
-
- ccccaaaannnncccceeeellll(((())))
- virtual void cancel(Widget w, XtPointer clientData);
-
-
- This function provides a hook for derived classes that need to know
- when the user has selected the Cancel button. Applications that use
- dialogs should register an Xt-style callback with the _p_o_s_t() method
- to be notified.
-
- aaaappppppppllllyyyy(((())))
- virtual void apply(Widget w, XtPointer clientData);
-
-
- This function provides a hook for derived classes that need to know
- when the user has selected the Apply button. Applications that use
- dialogs should register an Xt-style callback with the _p_o_s_t() method
- to be notified.
-
-
-
-
-
- PPPPaaaaggggeeee 11110000
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- ccccrrrreeeeaaaatttteeeeDDDDiiiiaaaalllloooogggg(((())))
- virtual Widget createDialog(Widget parent) = 0;
-
-
- Derived classes must override this function, which is called when
- the VkDialogManager class requires a new dialog widget. The function
- is expected to create and return a dialog of desired type. The
- dialog must be a child of the given parent.
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr(((())))
- VkDialogManager(const char* name);
-
-
- The constructor initializes the VkDialogManager. It can only be
- called by derived classes.
-
- ~~~~VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr(((())))
- virtual void ~VkDialogManager(void);
-
-
- The destructor frees all memory associated with the VkDialogManager
- class and destroys all cached dialog widgets.
-
- sssseeeettttTTTTiiiittttlllleeee(((())))
- void setTitle(const char* nextTitle);
-
-
- This function can be used to specify the title of the next dialog
- widget to be posted by this dialog manager. The title is reset after
- each call to one of the _p_o_s_t() member functions. The string provided
- is first treated as the name of a resource, and only used directly
- if no resource is found. For example, a dialog's title might be
- specified as follows:
-
- theErrorDialog->setTitle("error37Title");
-
- The application's application defaults might then specify the real title
- as:
-
- *error37Title: "Internal Malfunction Error Dialog"
-
- The most common use of this feature is for internationalization.
- Applications that do not care about the ability to change titles without
- recompiling can simply specify the desired string by setting a resource.
-
- If _s_e_t_T_i_t_l_e() is not called prior to posting a dialog, the dialog
- title defaults to the value of the XmNdialogTitle resource for the
- given widget. If no such resource is set, the title defaults to the
- name of the application.
-
-
-
-
-
-
- PPPPaaaaggggeeee 11111111
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- sssseeeettttBBBBuuuuttttttttoooonnnnLLLLaaaabbbbeeeellllssss(((())))
- void setButtonLabels(const char *nextOK,
- const char *nextCancel,
- const char *nextApply);
-
-
- This function can be used to specify the labels on the buttons of
- the next dialog to be posted. The values affect only the next dialog
- to be posted and are reset afterwards to their default values. Like
- _s_e_t_T_i_t_l_e() this function first treats each given string as the name
- of a resource to be loaded, then as the label itself. If no labels
- are specified, the defaults are normally as follows:
-
-
- BBBBuuuuttttttttoooonnnn FFFFiiiirrrrsssstttt CCCChhhhooooiiiicccceeee FFFFaaaallllllllbbbbaaaacccckkkk
- OK Value of XmNokLabelString "OK"
- Cancel Value of XmNcancelLableString "Cancel"
- Apply Value of XmNapplyLableString "Apply"
-
-
- uuuunnnnppppoooosssstttt(((())))
- void unpost(void);
-
-
- This function removes the most recently posted dialog.
-
- uuuunnnnppppoooosssstttt(((())))
- void unpost(Widget w);
-
-
- This function removes the given dialog widget.
-
- uuuunnnnppppoooossssttttAAAAllllllll(((())))
- void unpostAll(void);
-
-
- This function removes all dialogs of a given type from the screen.
-
-
- cccceeeennnntttteeeerrrrOOOOnnnnSSSSccccrrrreeeeeeeennnn(((())))
- void centerOnScreen(Boolean center);
-
-
- By default, dialogs are centered over a parent window, as specified
- in the call to _p_o_s_t(), or over the application's main window, if no
- window is given. If this function is called with a value of TRUE
- prior to posting a dialog, the dialog will be force to the center of
- the screen, regardless of the position of the specified parent.
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 11112222
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- eeeennnnaaaabbbblllleeeeCCCCaaaannnncccceeeellllBBBBuuuuttttttttoooonnnn(((())))
- void enableCancelButton (Boolean b);
-
-
- Sets whether or not the default will be to provide a _C_A_N_C_E_L button
- in future dialogs.
-
-
- llllaaaassssttttPPPPoooosssstttteeeedddd(((())))
- Widget lastPosted(void);
-
-
- This function returns the Widget ID of the last posted dialog. In
- some cases, it might be useful to be able to manipulate this widget
- directly, while it is posted.
-
- ppppoooosssstttt(((())))
- virtual Widget post ( const char *message = NULL,
- XtCallbackProc okCB = NULL,
- XtCallbackProc cancelCB = NULL,
- XtCallbackProc applyCB = NULL,
- XtPointer clientData = NULL,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL);
-
-
- This member function displays a new dialog widget, attempting to use
- cached dialogs if possible. Like all Motif dialogs, the application
- is expected to return to the event loop to allow the user to
- interact with the posted dialog. With no arguments, _p_o_s_t() simply
- displays the dialog. This may be appropriate for some derived
- classes that may not support a message. If an initial argument is
- given, the dialog displays the indicated message. The _m_e_s_s_a_g_e is
- first treated as the name of a resource to be loaded and uses as the
- string. If no resource is found, the string itself is assumed to be
- the dialog message.
-
- The three optional callback arguments must be Xt-style callbacks to
- be called if the corresponding button is selected by the user. The
- presence or absence of these callbacks provide some control over
- what buttons appear in the posted dialog. Some dialogs, however, may
- override this behavior to force certain buttons to appear. For
- example, a VkWarningDialog will normally have only an OK button. By
- calling the _p_o_s_t() function with callbacks for the cancel and apply
- operations, a warning dialog will appear with three buttons, ok,
- cancel, and apply. The _c_l_i_e_n_t_D_a_t_a argument allows the caller to
- specify data to be passed to these callbacks when they are called.
-
- To support context-sensitive help, each individual dialog can supply
- a help string to be passed to the help system when the user requests
- help for this dialog.
-
-
-
-
- PPPPaaaaggggeeee 11113333
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- The final optional argument allows the caller to specify a ViewKit
- VkSimpleWindow over which this dialog should be centered. If this
- argument is not supplied, the dialog will be centered over the
- application's main window.
-
- ppppoooosssstttt(((())))
- Widget post ( const char *msg,
- VkSimpleWindow *parent)
-
- Widget post ( const char *msg,
- const char *helpString,
- VkSimpleWindow *parent)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- const char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget post ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtCallbackProc applyCB,
- XtPointer clientData,
- VkSimpleWindow *parent)
-
-
- These member functions provide a large number of variations on the
- basic _p_o_s_t() member function. The arguments are designed to support
- typical arrangements of arguments without requiring the complete
- list of parameters supported by the basic function.
-
-
-
-
-
-
- PPPPaaaaggggeeee 11114444
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- ppppoooossssttttMMMMooooddddaaaallll(((())))
- virtual Widget postModal (
- const char *message = NULL,
- XtCallbackProc okCB = NULL,
- XtCallbackProc cancelCB = NULL,
- XtCallbackProc applyCB = NULL,
- XtPointer clientData = NULL,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL);
-
-
- This function is similar to the _p_o_s_t() member function, except that
- the dialog will be a modal dialog, which must be dismissed before
- the application can accept other input.
-
- ppppoooossssttttMMMMooooddddaaaallll(((())))
- Widget postModal ( const char *msg,
- VkSimpleWindow *parent)
-
- Widget postModal ( const char *msg,
- const char *helpString,
- VkSimpleWindow *parent)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- const char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget postModal ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtCallbackProc applyCB,
- XtPointer clientData,
-
-
-
- PPPPaaaaggggeeee 11115555
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- VkSimpleWindow *parent)
-
-
- These member functions provide a large number of variations on the
- basic _p_o_s_t_M_o_d_a_l() member function. The arguments are designed to
- support typical arrangements of arguments without requiring the
- complete list of parameters supported by the basic function.
-
- ppppoooossssttttBBBBlllloooocccckkkkeeeedddd(((())))
- virtual Widget postBlocked (
- const char *message = NULL,
- XtCallbackProc okCB = NULL,
- XtCallbackProc cancelCB = NULL,
- XtCallbackProc applyCB = NULL,
- XtPointer clientData = NULL,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL);
-
-
- This function is similar to _p_o_s_t() except that after posting the
- dialog, the function enters a secondary event loop which does not
- return until the user has dismissed the dialog. The dialog is posted
- as a full application modal dialog to minimize potential problems
- that could be caused by the secondary event loop, but applications
- should be aware that the second event loop is being used, and be
- sure that no non-re-entrant code can be called.
-
- ppppoooossssttttBBBBlllloooocccckkkkeeeedddd(((())))
- Widget postBlocked ( const char *msg,
- VkSimpleWindow *parent)
-
- Widget postBlocked ( const char *msg,
- const char *helpString,
- VkSimpleWindow *parent)
-
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtPointer clientData,
- const char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- VkSimpleWindow *parent = NULL)
-
-
-
-
- PPPPaaaaggggeeee 11116666
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtPointer clientData,
- char *helpString,
- VkSimpleWindow *parent = NULL)
-
- Widget postBlocked ( const char *msg,
- XtCallbackProc okCB,
- XtCallbackProc cancelCB,
- XtCallbackProc applyCB,
- XtPointer clientData,
- VkSimpleWindow *parent)
-
-
- These member functions provide a large number of variations on the
- basic _p_o_s_t_B_l_o_c_k_e_d() member function. The arguments are designed to
- support typical arrangements of arguments without requiring the
- complete list of parameters supported by the basic function.
-
- ppppoooossssttttAAAAnnnnddddWWWWaaaaiiiitttt(((())))
- virtual VkDialogReason postAndWait (
- const char *message = NULL,
- Boolean ok = TRUE,
- Boolean cancel = TRUE,
- Boolean apply = FALSE,
- const char *helpString = NULL,
- VkSimpleWindow *parent = NULL);
-
-
- This function is similar to _p_o_s_t() except that the application
- enters a secondary event loop after posting the dialog and does not
- return until the user has dismissed the dialog. Unlike
- _p_o_s_t_B_l_o_c_k_e_d(), _p_o_s_t_A_n_d_W_a_i_t() handles all callbacks internally and
- returns a value that reports what button was selected. The possible
- return values are VkDialogManager::OK, VkDialogManager::CANCEL, or
- VkDialogManager::APPLY. This function is useful for applications in
- which it is necessary or more convenient to not go on to the next
- line of code until the user has dismissed the dialog. For example,
- an application opening a file might use the VkFileSelectionDialog (a
- class derived from VkDialogManager) as follows:
-
-
- if(theFileSelectionDialog->postAndWait( )
- == VkDialogManager::OK)
- fd = open(theFileSelectionDialog->fileName(),
- O_RDONLY);
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 11117777
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- When _p_o_s_t_A_n_d_W_a_i_t() is used, the dialog is posted as a full
- application modal dialog to minimize potential problems that could
- be caused by the secondary event loop, but applications should be
- aware that the second event loop is being used, and be sure that no
- non-re-entrant code can be called.
-
- Because no callbacks are involved when using this interface, the
- second, third, and forth arguments are Boolean values that indicate
- which buttons should appear in the dialog. Note that these flags are
- considered along with the default behavior of each type of dialog.
- For example, a VkQuestionDialog will always have OK and Cancel
- buttons, but the caller can add an "apply" button if needed.
-
- ppppoooossssttttAAAAnnnnddddWWWWaaaaiiiitttt(((())))
- VkDialogReason postAndWait ( const char *message,
- const char *helpString,
- VkSimpleWindow *parent = NULL);
-
- VkDialogReason postAndWait ( const char *message,
- VkSimpleWindow *parent)
-
-
- These member functions provide a large number of variations on the
- basic _p_o_s_t_A_n_d_W_a_i_t() member function. The arguments are designed to
- support typical arrangements of arguments without requiring the
- complete list of parameters supported by the basic function.
-
-
- uuuusssseeeeOOOOvvvveeeerrrrllllaaaayyyyDDDDiiiiaaaallllooooggggssss(((())))
- static void useOverlayDialogs(const Boolean flag);
-
-
- Controls whether dialogs that are created subsequently will be in
- the normal planes (_f_l_a_g = _F_a_l_s_e) or in the deepest available overlay
- (_f_l_a_g = _T_r_u_e).
-
-
- sssseeeettttVVVViiiissssuuuuaaaallll(((())))
- void setVisual (VkVisual *v)
-
-
- Used to set visual resources before creating the first dialog. In
- the event that both this and the arglist are set (see _s_e_t_A_r_g_s(),
- below), this overrides any visual arguments in the arglist.
-
-
- sssseeeettttAAAArrrrggggssss(((())))
- void setArgs (ArgList list, Cardinal argCnt)
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 11118888
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- Pass in resources to be used when creating the first dialog. These
- may or may not include visuals arguments.
-
-
-
- DDDDAAAATTTTAAAA MMMMEEEEMMMMBBBBEEEERRRR DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
- ____aaaaccccttttiiiioooonnnn
- int _action;
-
-
- This protected member always contains a value that indicates the
- user's action in choosing dialog buttons. The possible values are
- VkDialogManager::OK, VkDialogManager::CANCEL,
- VkDialogManager::APPLY, or VkDialogManager::NONE.
-
- ____sssshhhhoooowwwwOOOOKKKK
- Boolean _showOK;
-
-
-
- This member can be set to TRUE by derived classes to force the OK button
- to always be shown for all dialogs of a particular type. If set to FALSE,
- the appearance of the OK button depends on what callbacks have been
- specified when posting the dialog.
-
- ____sssshhhhoooowwwwCCCCaaaannnncccceeeellll
- Boolean _showCancel;
-
-
- This member can be set to TRUE by derived classes to force the
- Cancel button to always be shown for all dialogs of a particular
- type. If set to FALSE, the appearance of the Cancel button depends
- on what callbacks have been specified when posting the dialog.
-
- ____sssshhhhoooowwwwAAAAppppppppllllyyyy
- Boolean _showApply;
-
-
- This member can be set to TRUE by derived classes to force the Apply
- button to always be shown for all dialogs of a particular type. If
- set to FALSE, the appearance of the Apply button depends on what
- callbacks have been specified when posting the dialog.
-
- ____aaaalllllllloooowwwwMMMMuuuullllttttiiiipppplllleeeeDDDDiiiiaaaallllooooggggssss
- Boolean _allowMultipleDialogs;
-
-
- The default behavior of the VkDialogManager class is to allow
- multiple dialogs of any given type to be posted at once. The
- VkDialogManager class calls derived class member function
- _c_r_e_a_t_e_D_i_a_l_o_g() as needed to create additional widgets. For some
- types of dialogs, it makes more sense to allow only one instance of
-
-
-
- PPPPaaaaggggeeee 11119999
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- a particular dialog type to exist at any one time. For example,
- multiple nested calls to _b_u_s_y() (see VkApp(3X)) should not normally
- produce multiple dialogs. If a derived class sets
- _allowMultipleDialogs to FALSE, the VkDialogManager class will not
- create additional dialogs, but will reuse an existing dialog in all
- cases.
-
- ____mmmmiiiinnnniiiimmmmiiiizzzzeeeeMMMMuuuullllttttiiiipppplllleeeeDDDDiiiiaaaallllooooggggssss
- Boolean _minimizeMultipleDialogs;
-
-
- Normally, VkDialogManager caches dialogs on a per-toplevel window
- basis. If there are many toplevel windows, this could result in
- having many dialogs of the same type, which may be undesirable for
- some types of dialogs, particularly if they are expensive to create.
- If the flag _minimizeMultipleDialogs is set to TRUE, VkDialogManager
- will reuse any existing dialog that is not currently displayed. A
- new dialog will be created only if all existing instances of the
- dialog type are currently being displayed.
-
- pppprrrreeeeppppoooossssttttCCCCaaaallllllllbbbbaaaacccckkkk
- static const char* const prepostCallback;
-
-
- This callback is invoked just before a dialog is displayed. The
- _c_a_l_l_D_a_t_a parameter indicates the dialog widget about to be
- displayed.
-
- IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
- callCallbacks(), addCallback(), removeCallback(),
- removeAllCallbacks()
-
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
- installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
- afterRealizeHook(), setDefaultResources(), getResources(),
- name(), baseWidget() okToQuit(), _name, _baseWidget, _w,
- deleteCallback
-
-
- KKKKNNNNOOOOWWWWNNNN DDDDEEEERRRRIIIIVVVVEEEEDDDD CCCCLLLLAAAASSSSSSSSEEEESSSS
- VkBusyDialog, VkInterruptDialog, VkErrorDialog, VkFatalErrorDialog,
- VkFileSelectionDialog, VkWarningDialog, VkGenericDialog, VkPrefDialog,
- VkInfoDialog, VkQuestionDialog
-
- CCCCLLLLAAAASSSSSSSSEEEESSSS UUUUSSSSEEEEDDDD BBBBYYYY TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
- VkApp, VkSimpleWindow, VkWidgetList
-
- KKKKNNNNOOOOWWWWNNNN CCCCLLLLAAAASSSSSSSSEEEESSSS TTTTHHHHAAAATTTT UUUUSSSSEEEE TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
- VkApp, VkDialogManager, VkHelpPane, VkMenuBar, VkMenuConfirmFirstAction,
- VkPipe
-
-
-
-
- PPPPaaaaggggeeee 22220000
-
-
-
-
-
-
- VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx)))) VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr((((3333xxxx))))
-
-
-
- BBBBUUUUGGGGSSSS
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- VkComponent, VkApp, VkSimpleWindow, VkBusyDialog, VkInterruptDialog,
- VkErrorDialog, VkFatalErrorDialog, VkFileSelectionDialog,
- VkWarningDialog, VkGenericDialog, VkPrefDialog, VkInfoDialog,
- VkQuestionDialog
- _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
- _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
- _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
- _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 22221111
-
-
-
-